using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Features
{
    /// <summary>
    /// <para>Check Geometry</para>
    /// <para>Generates a report of the geometry problems in a feature class.</para>
    /// <para>生成要素类中几何问题的报告。</para>
    /// </summary>    
    [DisplayName("Check Geometry")]
    public class CheckGeometry : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CheckGeometry()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>One or more feature classes or feature layers to check for geometry problems.</para>
        /// <para>用于检查几何问题的一个或多个要素类或要素图层。</para>
        /// </param>
        /// <param name="_out_table">
        /// <para>Output Table</para>
        /// <para>The report (as a table) of the problems discovered.</para>
        /// <para>发现的问题的报告（以表格形式）。</para>
        /// </param>
        public CheckGeometry(List<object> _in_features, object _out_table)
        {
            this._in_features = _in_features;
            this._out_table = _out_table;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Check Geometry";

        public override string CallName => "management.CheckGeometry";

        public override List<string> AcceptEnvironments => ["configKeyword", "extent", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_table, _validation_method.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>One or more feature classes or feature layers to check for geometry problems.</para>
        /// <para>用于检查几何问题的一个或多个要素类或要素图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_features { get; set; }


        /// <summary>
        /// <para>Output Table</para>
        /// <para>The report (as a table) of the problems discovered.</para>
        /// <para>发现的问题的报告（以表格形式）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Validation Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the geometry validation method that will be used to identify geometry problems.</para>
        ///   <bulletList>
        ///     <bullet_item>Esri—Esri geometry validation method will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>OGC— Open Geospatial Consortium (OGC) geometry validation method will be used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于识别几何问题的几何验证方法。</para>
        ///   <bulletList>
        ///     <bullet_item>Esri - 将使用 Esri 几何验证方法。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>OGC— 将使用开放地理空间联盟 （OGC） 几何验证方法。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Validation Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _validation_method_value _validation_method { get; set; } = _validation_method_value._ESRI;

        public enum _validation_method_value
        {
            /// <summary>
            /// <para>Esri</para>
            /// <para>Esri—Esri geometry validation method will be used. This is the default.</para>
            /// <para>Esri - 将使用 Esri 几何验证方法。这是默认设置。</para>
            /// </summary>
            [Description("Esri")]
            [GPEnumValue("ESRI")]
            _ESRI,

            /// <summary>
            /// <para>OGC</para>
            /// <para>OGC— Open Geospatial Consortium (OGC) geometry validation method will be used.</para>
            /// <para>OGC— 将使用开放地理空间联盟 （OGC） 几何验证方法。</para>
            /// </summary>
            [Description("OGC")]
            [GPEnumValue("OGC")]
            _OGC,

        }

        public CheckGeometry SetEnv(object configKeyword = null, object extent = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, extent: extent, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}